package com.ysd.qxgl.service;

import java.util.List;

import javax.annotation.Resource;

import com.ysd.qxgl.dao.IUsersDao;
import com.ysd.qxgl.dto.UsersDTO;
import com.ysd.qxgl.model.Users;

import org.springframework.stereotype.Service;

@Service
public class UsersServiceImpl implements IUsersService {

    @Resource
    private IUsersDao usersDao;

    @Override
    public List<Users> findAll() {
        return usersDao.findAll();
    }

    @Override
    public List<Users> findAllDTO(UsersDTO dto) {
        return usersDao.findAllDTO(dto);
    }

    @Override
    public int addUser(Users user) {
        return usersDao.addUser(user);
    }

    @Override
    public int editUser(Users users) {
        return usersDao.editUser(users);
    }

     @Override
    public int delUsers(String id) {
        return usersDao.delUsers(id);
    }

    @Override
    public int resetPassWord(String id) {
        return usersDao.resetPassWord(id);
    }

    @Override
    public int lockedUser(String id) {
        return usersDao.lockedUser(id);
    }

    @Override
    public int unLockedUser(String id) {
        return usersDao.unLockedUser(id);
    }

    @Override
    public Users login(String login_name, String password) {
        return usersDao.login(login_name, password);
    }

    @Override
    public int getCount(UsersDTO dto) {
        return usersDao.getCount(dto);
    }

}